<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SC2API: sc2::Client Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="SC2-Logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SC2API
   </div>
   <div id="projectbrief">An API for AI for StarCraft II</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>sc2</b></li><li class="navelem"><a class="el" href="classsc2_1_1_client.html">Client</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classsc2_1_1_client-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">sc2::Client Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The base class for <a class="el" href="classsc2_1_1_agent.html" title="The base class for user defined bots. ">Agent</a> and <a class="el" href="classsc2_1_1_replay_observer.html" title="A client for running a replay. ">ReplayObserver</a>.  
 <a href="classsc2_1_1_client.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="sc2__client_8h_source.html">sc2_client.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for sc2::Client:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classsc2_1_1_client.png" usemap="#sc2::Client_map" alt=""/>
  <map id="sc2::Client_map" name="sc2::Client_map">
<area href="classsc2_1_1_client_events.html" title="A set of common events a user can override in their derived bot or replay observer class..." alt="sc2::ClientEvents" shape="rect" coords="70,0,201,24"/>
<area href="classsc2_1_1_agent.html" title="The base class for user defined bots. " alt="sc2::Agent" shape="rect" coords="0,112,131,136"/>
<area href="classsc2_1_1_replay_observer.html" title="A client for running a replay. " alt="sc2::ReplayObserver" shape="rect" coords="141,112,272,136"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a9bde4735245a945f37c5505cde5d09c1"><td class="memItemLeft" align="right" valign="top"><a id="a9bde4735245a945f37c5505cde5d09c1"></a>
const <a class="el" href="classsc2_1_1_observation_interface.html">ObservationInterface</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_client.html#a9bde4735245a945f37c5505cde5d09c1">Observation</a> () const</td></tr>
<tr class="memdesc:a9bde4735245a945f37c5505cde5d09c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <a class="el" href="classsc2_1_1_observation_interface.html" title="The ObservationInterface reflects the current state of the game. Guaranteed to be valid when OnGameSt...">ObservationInterface</a> is used to query game state. <br /></td></tr>
<tr class="separator:a9bde4735245a945f37c5505cde5d09c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acdc61fe5c58e0a8f4f246d8fbcc5cefc"><td class="memItemLeft" align="right" valign="top"><a id="acdc61fe5c58e0a8f4f246d8fbcc5cefc"></a>
<a class="el" href="classsc2_1_1_query_interface.html">QueryInterface</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_client.html#acdc61fe5c58e0a8f4f246d8fbcc5cefc">Query</a> ()</td></tr>
<tr class="memdesc:acdc61fe5c58e0a8f4f246d8fbcc5cefc"><td class="mdescLeft">&#160;</td><td class="mdescRight">The UnitQuery interface is used to issue commands to units. <br /></td></tr>
<tr class="separator:acdc61fe5c58e0a8f4f246d8fbcc5cefc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac42601e18b7c109f6f0e58a7780a79ac"><td class="memItemLeft" align="right" valign="top"><a id="ac42601e18b7c109f6f0e58a7780a79ac"></a>
<a class="el" href="classsc2_1_1_debug_interface.html">DebugInterface</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_client.html#ac42601e18b7c109f6f0e58a7780a79ac">Debug</a> ()</td></tr>
<tr class="memdesc:ac42601e18b7c109f6f0e58a7780a79ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <a class="el" href="classsc2_1_1_debug_interface.html">DebugInterface</a> allows a derived class to print text, draw primitive shapes and spawn/destroy units. <br /></td></tr>
<tr class="separator:ac42601e18b7c109f6f0e58a7780a79ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a741b9dd091f11694dd814c9b01f86dd8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsc2_1_1_control_interface.html">ControlInterface</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_client.html#a741b9dd091f11694dd814c9b01f86dd8">Control</a> ()</td></tr>
<tr class="separator:a741b9dd091f11694dd814c9b01f86dd8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90089d27b898fe537ccee87def3cec4b"><td class="memItemLeft" align="right" valign="top"><a id="a90089d27b898fe537ccee87def3cec4b"></a>
const <a class="el" href="classsc2_1_1_control_interface.html">ControlInterface</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>Control</b> () const</td></tr>
<tr class="separator:a90089d27b898fe537ccee87def3cec4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c44d74271f1cae11334a97849ed4da9"><td class="memItemLeft" align="right" valign="top"><a id="a3c44d74271f1cae11334a97849ed4da9"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Reset</b> ()</td></tr>
<tr class="separator:a3c44d74271f1cae11334a97849ed4da9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classsc2_1_1_client_events"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classsc2_1_1_client_events')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classsc2_1_1_client_events.html">sc2::ClientEvents</a></td></tr>
<tr class="memitem:ab980f6942030d3a0cd42e00782742237 inherit pub_methods_classsc2_1_1_client_events"><td class="memItemLeft" align="right" valign="top"><a id="ab980f6942030d3a0cd42e00782742237"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_client_events.html#ab980f6942030d3a0cd42e00782742237">OnGameFullStart</a> ()</td></tr>
<tr class="memdesc:ab980f6942030d3a0cd42e00782742237 inherit pub_methods_classsc2_1_1_client_events"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called when a game is started after a load. Fast restarting will not call this. <br /></td></tr>
<tr class="separator:ab980f6942030d3a0cd42e00782742237 inherit pub_methods_classsc2_1_1_client_events"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e2542b183f6ac980440cc93476163a3 inherit pub_methods_classsc2_1_1_client_events"><td class="memItemLeft" align="right" valign="top"><a id="a6e2542b183f6ac980440cc93476163a3"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_client_events.html#a6e2542b183f6ac980440cc93476163a3">OnGameStart</a> ()</td></tr>
<tr class="memdesc:a6e2542b183f6ac980440cc93476163a3 inherit pub_methods_classsc2_1_1_client_events"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called when a game is started or restarted. <br /></td></tr>
<tr class="separator:a6e2542b183f6ac980440cc93476163a3 inherit pub_methods_classsc2_1_1_client_events"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c5023d18ffc88bed76c844e643ef60d inherit pub_methods_classsc2_1_1_client_events"><td class="memItemLeft" align="right" valign="top"><a id="a2c5023d18ffc88bed76c844e643ef60d"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_client_events.html#a2c5023d18ffc88bed76c844e643ef60d">OnGameEnd</a> ()</td></tr>
<tr class="memdesc:a2c5023d18ffc88bed76c844e643ef60d inherit pub_methods_classsc2_1_1_client_events"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called when a game has ended. <br /></td></tr>
<tr class="separator:a2c5023d18ffc88bed76c844e643ef60d inherit pub_methods_classsc2_1_1_client_events"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f5839e220d2a5a19b30065e0b8290c4 inherit pub_methods_classsc2_1_1_client_events"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_client_events.html#a6f5839e220d2a5a19b30065e0b8290c4">OnStep</a> ()</td></tr>
<tr class="separator:a6f5839e220d2a5a19b30065e0b8290c4 inherit pub_methods_classsc2_1_1_client_events"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17297ffdf866ab1f4c3c31de64a1bc59 inherit pub_methods_classsc2_1_1_client_events"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_client_events.html#a17297ffdf866ab1f4c3c31de64a1bc59">OnUnitDestroyed</a> (const <a class="el" href="classsc2_1_1_unit.html">Unit</a> *)</td></tr>
<tr class="separator:a17297ffdf866ab1f4c3c31de64a1bc59 inherit pub_methods_classsc2_1_1_client_events"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7fc1dae3607d7e4fea5680bcea903a0 inherit pub_methods_classsc2_1_1_client_events"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_client_events.html#ac7fc1dae3607d7e4fea5680bcea903a0">OnUnitCreated</a> (const <a class="el" href="classsc2_1_1_unit.html">Unit</a> *)</td></tr>
<tr class="separator:ac7fc1dae3607d7e4fea5680bcea903a0 inherit pub_methods_classsc2_1_1_client_events"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adce0fc98fa9c3cc092a5a8b3f2feef45 inherit pub_methods_classsc2_1_1_client_events"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_client_events.html#adce0fc98fa9c3cc092a5a8b3f2feef45">OnUnitIdle</a> (const <a class="el" href="classsc2_1_1_unit.html">Unit</a> *)</td></tr>
<tr class="separator:adce0fc98fa9c3cc092a5a8b3f2feef45 inherit pub_methods_classsc2_1_1_client_events"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4cdc022420833b34fbcd1c9713096754 inherit pub_methods_classsc2_1_1_client_events"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_client_events.html#a4cdc022420833b34fbcd1c9713096754">OnUpgradeCompleted</a> (<a class="el" href="classsc2_1_1_s_c2_type.html">UpgradeID</a>)</td></tr>
<tr class="separator:a4cdc022420833b34fbcd1c9713096754 inherit pub_methods_classsc2_1_1_client_events"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad920d34fe6c49487373800dd1ec45757 inherit pub_methods_classsc2_1_1_client_events"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_client_events.html#ad920d34fe6c49487373800dd1ec45757">OnBuildingConstructionComplete</a> (const <a class="el" href="classsc2_1_1_unit.html">Unit</a> *)</td></tr>
<tr class="separator:ad920d34fe6c49487373800dd1ec45757 inherit pub_methods_classsc2_1_1_client_events"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afde152c65ab94bdb57e345a8fd1532aa inherit pub_methods_classsc2_1_1_client_events"><td class="memItemLeft" align="right" valign="top"><a id="afde152c65ab94bdb57e345a8fd1532aa"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_client_events.html#afde152c65ab94bdb57e345a8fd1532aa">OnNydusDetected</a> ()</td></tr>
<tr class="memdesc:afde152c65ab94bdb57e345a8fd1532aa inherit pub_methods_classsc2_1_1_client_events"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called when a nydus is placed. <br /></td></tr>
<tr class="separator:afde152c65ab94bdb57e345a8fd1532aa inherit pub_methods_classsc2_1_1_client_events"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9923f256e3bf6e518ccb8ec26f8ae88 inherit pub_methods_classsc2_1_1_client_events"><td class="memItemLeft" align="right" valign="top"><a id="ab9923f256e3bf6e518ccb8ec26f8ae88"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_client_events.html#ab9923f256e3bf6e518ccb8ec26f8ae88">OnNuclearLaunchDetected</a> ()</td></tr>
<tr class="memdesc:ab9923f256e3bf6e518ccb8ec26f8ae88 inherit pub_methods_classsc2_1_1_client_events"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called when a nuclear launch is detected. <br /></td></tr>
<tr class="separator:ab9923f256e3bf6e518ccb8ec26f8ae88 inherit pub_methods_classsc2_1_1_client_events"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d73b5a3462f757397ea5ac2f4aca8dc inherit pub_methods_classsc2_1_1_client_events"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_client_events.html#a3d73b5a3462f757397ea5ac2f4aca8dc">OnUnitEnterVision</a> (const <a class="el" href="classsc2_1_1_unit.html">Unit</a> *)</td></tr>
<tr class="separator:a3d73b5a3462f757397ea5ac2f4aca8dc inherit pub_methods_classsc2_1_1_client_events"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35424cb2a0baa509f997149521ab2c52 inherit pub_methods_classsc2_1_1_client_events"><td class="memItemLeft" align="right" valign="top"><a id="a35424cb2a0baa509f997149521ab2c52"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_client_events.html#a35424cb2a0baa509f997149521ab2c52">OnError</a> (const std::vector&lt; <a class="el" href="sc2__client_8h.html#ac7d3e3694a208204e099f04c1e5eded0">ClientError</a> &gt; &amp;, const std::vector&lt; std::string &gt; &amp;={})</td></tr>
<tr class="memdesc:a35424cb2a0baa509f997149521ab2c52 inherit pub_methods_classsc2_1_1_client_events"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called for various errors the library can encounter. See ClientError enum for possible errors. <br /></td></tr>
<tr class="separator:a35424cb2a0baa509f997149521ab2c52 inherit pub_methods_classsc2_1_1_client_events"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The base class for <a class="el" href="classsc2_1_1_agent.html" title="The base class for user defined bots. ">Agent</a> and <a class="el" href="classsc2_1_1_replay_observer.html" title="A client for running a replay. ">ReplayObserver</a>. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a741b9dd091f11694dd814c9b01f86dd8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a741b9dd091f11694dd814c9b01f86dd8">&#9670;&nbsp;</a></span>Control()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsc2_1_1_control_interface.html">ControlInterface</a>* sc2::Client::Control </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The <a class="el" href="classsc2_1_1_control_interface.html">ControlInterface</a> is only meant to be used by the coordinator as it provides functionality for connecting to Starcraft2, setting up a websocket connection and issuing blocking commands via SC2's protocol. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/sc2api/<a class="el" href="sc2__client_8h_source.html">sc2_client.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
